import java.util.Scanner;
 
public class Lesson19 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        
        // 创建三角形对象并输入坐标
        GeometricTriangle triangle = new GeometricTriangle();
        System.out.print("Enter the coordinates of three vertices (x1 y1 x2 y2 x3 y3): ");
        triangle.pointAX = scanner.nextDouble();
        triangle.pointAY = scanner.nextDouble();
        triangle.pointBX = scanner.nextDouble();
        triangle.pointBY = scanner.nextDouble();
        triangle.pointCX = scanner.nextDouble();
        triangle.pointCY = scanner.nextDouble();
        
        // 计算面积并输出（保留1位小数）
        double area = triangle.computeArea();
        System.out.println("The area of the triangle is: " + String.format("%.1f", area));
        
        scanner.close();
    }
}
 
// 自定义三角形类，用于计算面积
class GeometricTriangle {
    // 三角形的三个顶点坐标
    double pointAX, pointAY;
    double pointBX, pointBY;
    double pointCX, pointCY;
    
    // 计算三角形面积（使用行列式公式）
    public double computeArea() {
        // 计算向量AB和AC的叉积（2D情况下）
        double vectorABX = pointBX - pointAX;
        double vectorABY = pointBY - pointAY;
        double vectorACX = pointCX - pointAX;
        double vectorACY = pointCY - pointAY;
        
        // 叉积的绝对值的一半就是三角形面积
        double crossProduct = vectorABX * vectorACY - vectorABY * vectorACX;
        return Math.abs(crossProduct) / 2.0;
    }
}